﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DownLoadNhieuNhat.ascx.cs"
    Inherits="DownLoadNhieuNhat" %>
<%@ Import Namespace="TaiLieu" %>
<table style="width: 100%">
    <tr>
        <td colspan="3" style="height: 25px; background-color: #4CB203; color: White; padding-left: 2px;
            font-weight: bold; font-size: 14px">
            Trang tài liệu download nhiều nhất 
        </td>
    </tr>
</table>
<table id="Table2" style="width: 100%" cellspacing="1" cellpadding="1">
    <tr>
        <td align="left">
            <asp:GridView runat="server" ID="grid" BorderColor="#CC9966" BorderWidth="1px" ShowHeader="true"
                RowStyle-Height="25px" Width="100%" CellPadding="4" AutoGenerateColumns="False"
                AllowSorting="True" BackColor="White" ShowFooter="false" p AllowPaging="True"
                OnPageIndexChanging="grid_PageIndexChanging" PageSize="50">
                <Columns>
                    <asp:TemplateField HeaderText="Tên tài liệu">
                        <ItemTemplate>
                            <a href="?/<%#Eval(ColumTaiLieu_download.query)%>/chi-tiet">
                                <%#Eval(ColumTaiLieu_download.Name)%></a><br />
                            <%#Eval(ColumTaiLieu_download.Summary)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="số lần download">
                        <ItemTemplate>
                            lượt download:
                            <%#Eval(ColumTaiLieu_download.NumberDownload)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="">
                        <ItemTemplate>
                            <%if (Sessions.members == null)
                              { %>
                            đăng nhập để nhìn thấy link &nbsp;<a style="color: Red; font-size: 12px" href="?/dang-nhap">Đăng
                                nhập</a>
                            <%}
                              else
                              { %>
                            <a target="_blank" style="color:Red" href="download.aspx?<%#Eval(ColumTaiLieu_download.query)%>">Download</a><%} %>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                </Columns>
                <RowStyle BorderWidth="1px" />
            </asp:GridView>
        </td>
    </tr>
</table>
